Modulo

Block Group: Math Operations
Icon: Modulo block icon

The Modulo block returns the quotient and remainder from division.


Input/Output Properties

The following properties of the Modulo block can take input and give output.

input specifies the dividend.

modulo specifies the divisor.


Output Properties

The following properties of the Modulo block can give output but cannot take input.

quotient returns the integer result of input divided by modulo.

remainder returns the remainder. The remainder property always has the same sign as the input property.


Examples

The following image shows five examples of the Modulo block.

Modulo block examples